package com.peiqi.aiproject.controller;

import cn.hutool.http.HttpStatus;
import com.peiqi.aiproject.domain.Plan;
import com.peiqi.aiproject.domain.Register;
import com.peiqi.aiproject.domain.vo.ResponseVO;
import com.peiqi.aiproject.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 删除用户相关接口
 */
@RestController
@RequestMapping("/deletes")
public class DeleteController {
    @Resource
    UserService userService;
    @PostMapping()
    public ResponseVO<String> deletes(@RequestBody Register plan){
        String token = userService.deletes(plan);
        return ResponseVO.success(HttpStatus.HTTP_CREATED,token);
    }
}
